using System;
using System.Windows.Forms;
using System.Drawing;
using System.ComponentModel;

using UtilityLibrary.Menus;
using UtilityLibrary.Collections;

namespace UtilityLibrary.CommandBars
{
	/// <summary>
	/// Summary description for CommandBaMenu
	/// </summary>
	[ToolboxItem(false)] 
	public class CommandBarMenu : ContextMenu
	{
		#region Class Variables
		// This is just to keep track of the selected
		// menu as well as hold the menuitems in the menubar
		Menu selectedMenuItem = null;
		#endregion
		
		#region Constructors
		public CommandBarMenu(MenuItemExCollection items)
		{
			for(int i = 0; i < items.Count; i++)
			{
				MenuItems.Add((MenuItemEx)items[i]);
			}
		}
		#endregion

		#region Overrides
		protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
		{
			return base.ProcessCmdKey(ref msg, keyData);
		}
		#endregion
		
		#region Properties
		internal Menu SelectedMenuItem
		{
			set { selectedMenuItem = value; }
			get { return selectedMenuItem; }
		}
		#endregion
		
	}
}
